//-----------------------------------------------------------------------
// <copyright file="a_CatSubService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_CatSubService
    {
        #region a_CatSub

        public static void Createa_CatSub(a_CatSub a_CatSub)
        {            
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                a_CatSubDAO.Createa_CatSub(a_CatSub);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_CatSub(a_CatSub a_CatSub)
        {            
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                a_CatSubDAO.Updatea_CatSub(a_CatSub);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_CatSub(int subCatID)
        {            
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                a_CatSubDAO.Deletea_CatSub(subCatID);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_CatSub Geta_CatSub(int subCatID)
        {            
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSub(subCatID);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }                

        public static a_CatSubCollection Geta_CatSubList(a_CatSubColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSubList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_CatSubCollection Geta_CatSubList(a_CatSubColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSubList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion

        #region Ngoc
        public static a_CatSubCollection Geta_CatSubList_mcid(Int32 mcid, a_CatSubColumns orderBy, OrderDirection orderDirection)
        {
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSubList_mcid(mcid, orderBy, orderDirection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_CatSubCollection Geta_CatSubList_mcid(Int32 mcid, a_CatSubColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSubList_mcid(mcid, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static a_CatSubCollection Geta_CatSubListByCatMain(int catMainId)
        {
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSubListByCateMain(catMainId);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_CatSub Geta_CatSubByName(string name)
        {
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSubByName(name);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }  
     
        public static a_CatSubCollection Geta_CatSubList_join_cattree(int catMainId)
        {
            try
            {
                a_CatSubDAO a_CatSubDAO = new a_CatSubDAO();
                return a_CatSubDAO.Geta_CatSubList_join_cattree(catMainId);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        #endregion 
    }
}